package pers.mine.nook;

import java.util.ArrayList;
import java.util.List;

import pers.mine.po.FrontTask;
import pers.mine.po.FrontUser;
/**
 * TODO 
 * @author Mine
 * @since 2017年6月12日_上午10:22:38
 */
public class TaskInfo {
	
	private int maxNum;
	private String desc;
	private String name;
	private int coin;
	
	private FrontTask frontTask;
	
	public int getMaxNum() {
		return maxNum;
	}
	public void setMaxNum(int maxNum) {
		this.maxNum = maxNum;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getCoin() {
		return coin;
	}
	public void setCoin(int coin) {
		this.coin = coin;
	}
	public static List<TaskInfo> getALLTask(){
    	List<TaskInfo> list = new ArrayList<>();
    	TaskInfo temp = new TaskInfo();
    	temp.setName("每日签到");
    	temp.setFrontTask(new FrontTask());
    	temp.setMaxNum(1);
    	temp.setCoin(5);
    	temp.setDesc("签到可获取5个硬币");
    	list.add(temp);
    	temp = new TaskInfo();
    	temp.setFrontTask(new FrontTask());
    	temp.setName("每日浏览任务");
    	temp.setMaxNum(5);
    	temp.setCoin(20);
    	temp.setDesc("完成观看5个视频,获取20个硬币");
    	list.add(temp);
    	return list;
    }
	
	public static List<TaskInfo> getALLTaskWithFrontTask(List<FrontTask>  frontTasklists){
		List<TaskInfo> allTask = getALLTask();
		if(frontTasklists ==null){
			return allTask;
		}
		int size=frontTasklists.size();
		for(int i =0;i<size;i++){
			FrontTask one = frontTasklists.get(i);
			allTask.get(one.getIndex()).setFrontTask(one);
		}
		return allTask;
    }
	
	
	
	public FrontTask getFrontTask() {
		return frontTask;
	}
	public void setFrontTask(FrontTask frontTask) {
		this.frontTask = frontTask;
	}
}
